﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x02000113 RID: 275
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class BattleRogueMagicScepter : IMessage<BattleRogueMagicScepter>, IMessage, IEquatable<BattleRogueMagicScepter>, IDeepCloneable<BattleRogueMagicScepter>, IBufferMessage
	{
		// Token: 0x170003AE RID: 942
		// (get) Token: 0x06000C8B RID: 3211 RVA: 0x0002516C File Offset: 0x0002336C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<BattleRogueMagicScepter> Parser
		{
			get
			{
				return BattleRogueMagicScepter._parser;
			}
		}

		// Token: 0x170003AF RID: 943
		// (get) Token: 0x06000C8C RID: 3212 RVA: 0x00025173 File Offset: 0x00023373
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return BattleRogueMagicScepterReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x170003B0 RID: 944
		// (get) Token: 0x06000C8D RID: 3213 RVA: 0x00025185 File Offset: 0x00023385
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return BattleRogueMagicScepter.Descriptor;
			}
		}

		// Token: 0x06000C8E RID: 3214 RVA: 0x0002518C File Offset: 0x0002338C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleRogueMagicScepter()
		{
		}

		// Token: 0x06000C8F RID: 3215 RVA: 0x000251AC File Offset: 0x000233AC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleRogueMagicScepter(BattleRogueMagicScepter other) : this()
		{
			this.scepterId_ = other.scepterId_;
			this.rogueMagicUnitInfoList_ = other.rogueMagicUnitInfoList_.Clone();
			this.level_ = other.level_;
			this.trenchCount_ = other.trenchCount_.Clone();
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x06000C90 RID: 3216 RVA: 0x0002520A File Offset: 0x0002340A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleRogueMagicScepter Clone()
		{
			return new BattleRogueMagicScepter(this);
		}

		// Token: 0x170003B1 RID: 945
		// (get) Token: 0x06000C91 RID: 3217 RVA: 0x00025212 File Offset: 0x00023412
		// (set) Token: 0x06000C92 RID: 3218 RVA: 0x0002521A File Offset: 0x0002341A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint ScepterId
		{
			get
			{
				return this.scepterId_;
			}
			set
			{
				this.scepterId_ = value;
			}
		}

		// Token: 0x170003B2 RID: 946
		// (get) Token: 0x06000C93 RID: 3219 RVA: 0x00025223 File Offset: 0x00023423
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<BattleRogueMagicUnit> RogueMagicUnitInfoList
		{
			get
			{
				return this.rogueMagicUnitInfoList_;
			}
		}

		// Token: 0x170003B3 RID: 947
		// (get) Token: 0x06000C94 RID: 3220 RVA: 0x0002522B File Offset: 0x0002342B
		// (set) Token: 0x06000C95 RID: 3221 RVA: 0x00025233 File Offset: 0x00023433
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Level
		{
			get
			{
				return this.level_;
			}
			set
			{
				this.level_ = value;
			}
		}

		// Token: 0x170003B4 RID: 948
		// (get) Token: 0x06000C96 RID: 3222 RVA: 0x0002523C File Offset: 0x0002343C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public MapField<uint, uint> TrenchCount
		{
			get
			{
				return this.trenchCount_;
			}
		}

		// Token: 0x06000C97 RID: 3223 RVA: 0x00025244 File Offset: 0x00023444
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as BattleRogueMagicScepter);
		}

		// Token: 0x06000C98 RID: 3224 RVA: 0x00025254 File Offset: 0x00023454
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(BattleRogueMagicScepter other)
		{
			return other != null && (other == this || (this.ScepterId == other.ScepterId && this.rogueMagicUnitInfoList_.Equals(other.rogueMagicUnitInfoList_) && this.Level == other.Level && this.TrenchCount.Equals(other.TrenchCount) && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x06000C99 RID: 3225 RVA: 0x000252C8 File Offset: 0x000234C8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.ScepterId != 0U)
			{
				num ^= this.ScepterId.GetHashCode();
			}
			num ^= this.rogueMagicUnitInfoList_.GetHashCode();
			if (this.Level != 0U)
			{
				num ^= this.Level.GetHashCode();
			}
			num ^= this.TrenchCount.GetHashCode();
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x06000C9A RID: 3226 RVA: 0x0002533C File Offset: 0x0002353C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x06000C9B RID: 3227 RVA: 0x00025344 File Offset: 0x00023544
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x06000C9C RID: 3228 RVA: 0x00025350 File Offset: 0x00023550
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.ScepterId != 0U)
			{
				output.WriteRawTag(8);
				output.WriteUInt32(this.ScepterId);
			}
			this.rogueMagicUnitInfoList_.WriteTo(ref output, BattleRogueMagicScepter._repeated_rogueMagicUnitInfoList_codec);
			if (this.Level != 0U)
			{
				output.WriteRawTag(24);
				output.WriteUInt32(this.Level);
			}
			this.trenchCount_.WriteTo(ref output, BattleRogueMagicScepter._map_trenchCount_codec);
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x06000C9D RID: 3229 RVA: 0x000253CC File Offset: 0x000235CC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.ScepterId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.ScepterId);
			}
			num += this.rogueMagicUnitInfoList_.CalculateSize(BattleRogueMagicScepter._repeated_rogueMagicUnitInfoList_codec);
			if (this.Level != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Level);
			}
			num += this.trenchCount_.CalculateSize(BattleRogueMagicScepter._map_trenchCount_codec);
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x06000C9E RID: 3230 RVA: 0x00025448 File Offset: 0x00023648
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(BattleRogueMagicScepter other)
		{
			if (other == null)
			{
				return;
			}
			if (other.ScepterId != 0U)
			{
				this.ScepterId = other.ScepterId;
			}
			this.rogueMagicUnitInfoList_.Add(other.rogueMagicUnitInfoList_);
			if (other.Level != 0U)
			{
				this.Level = other.Level;
			}
			this.trenchCount_.MergeFrom(other.trenchCount_);
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x06000C9F RID: 3231 RVA: 0x000254BA File Offset: 0x000236BA
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06000CA0 RID: 3232 RVA: 0x000254C4 File Offset: 0x000236C4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num <= 18U)
				{
					if (num == 8U)
					{
						this.ScepterId = input.ReadUInt32();
						continue;
					}
					if (num == 18U)
					{
						this.rogueMagicUnitInfoList_.AddEntriesFrom(ref input, BattleRogueMagicScepter._repeated_rogueMagicUnitInfoList_codec);
						continue;
					}
				}
				else
				{
					if (num == 24U)
					{
						this.Level = input.ReadUInt32();
						continue;
					}
					if (num == 34U)
					{
						this.trenchCount_.AddEntriesFrom(ref input, BattleRogueMagicScepter._map_trenchCount_codec);
						continue;
					}
				}
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
			}
		}

		// Token: 0x0400052A RID: 1322
		private static readonly MessageParser<BattleRogueMagicScepter> _parser = new MessageParser<BattleRogueMagicScepter>(() => new BattleRogueMagicScepter());

		// Token: 0x0400052B RID: 1323
		private UnknownFieldSet _unknownFields;

		// Token: 0x0400052C RID: 1324
		public const int ScepterIdFieldNumber = 1;

		// Token: 0x0400052D RID: 1325
		private uint scepterId_;

		// Token: 0x0400052E RID: 1326
		public const int RogueMagicUnitInfoListFieldNumber = 2;

		// Token: 0x0400052F RID: 1327
		private static readonly FieldCodec<BattleRogueMagicUnit> _repeated_rogueMagicUnitInfoList_codec = FieldCodec.ForMessage<BattleRogueMagicUnit>(18U, BattleRogueMagicUnit.Parser);

		// Token: 0x04000530 RID: 1328
		private readonly RepeatedField<BattleRogueMagicUnit> rogueMagicUnitInfoList_ = new RepeatedField<BattleRogueMagicUnit>();

		// Token: 0x04000531 RID: 1329
		public const int LevelFieldNumber = 3;

		// Token: 0x04000532 RID: 1330
		private uint level_;

		// Token: 0x04000533 RID: 1331
		public const int TrenchCountFieldNumber = 4;

		// Token: 0x04000534 RID: 1332
		private static readonly MapField<uint, uint>.Codec _map_trenchCount_codec = new MapField<uint, uint>.Codec(FieldCodec.ForUInt32(8U, 0U), FieldCodec.ForUInt32(16U, 0U), 34U);

		// Token: 0x04000535 RID: 1333
		private readonly MapField<uint, uint> trenchCount_ = new MapField<uint, uint>();
	}
}
